www.pudn.com > Fax_Polling.rar > AtrkFaxDlg.h


// AtrkFaxDlg.h : header file 
// 
 
#if !defined(AFX_ATRKFAXDLG_H__31DCFE09_B65C_11D4_9FD6_000021F39F78__INCLUDED_) 
#define AFX_ATRKFAXDLG_H__31DCFE09_B65C_11D4_9FD6_000021F39F78__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "../../../../../../api/vc6.0/inc/BmpApi.h" 
#include "../../../../../../api/vc6.0/inc/shpa3api.h" 
#include "FirstDlg.h" 
#include "SecondDlg.h" 
#include "ThirdDlg.h" 
#include "ForthDlg.h" 
 
 
enum { 
	C_SEND_FAX, 
	C_RECEIVE_FAX 
}; 
 
enum { 
	SO_IDLE=1, 
	SO_WAIT_OCCUPY_ACK, 
	SO_TX_PHONE_NUM, 
	SO_RX_BKWD_Ai, 
	SO_WAITBKWD_Ai_STOP, 
	SO_WAIT_KB, 
	SO_WAIT_KB_STOP, 
	SO_WAIT_REMOTE_PICKUP, 
	SO_WAIT_APP_HANGUP, 
	SO_WAIT_A1, 
	SO_WAIT_A1_STOP, 
	SO_SAY_IDLE, 
	SI_IDLE=21, 
	SI_DETECT_OCCUPY, 
	SI_RX_PHONE_NUM, 
	SI_RX_CALLERID, 
	SI_RX_KD, 
	SI_WAIT_KB, 
	SI_WAIT_KD_STOP, 
	SI_WAIT_APP_PICKUP, 
	SI_WAIT_APP_HANGUP, 
	SI_WAIT_REMOTE_HANGUP, 
	SI_WAIT_STOP 
}; 
 
// fax step 
enum{ 
  TRK_IDLE,						//idle 
 
  // only for auto send/rcv 
  TRK_WAIT_CONNECT,				//wait connection 
  TRK_PLAY_SELECT,				//play prompt: "select 1 to send and 2 to receive 
  TRK_CHECK_PLAY_SELECT,		//play prompt 1 
  TRK_CHECK_PLAY_START,			//play prompt 2 
 
  // only for manual send 
  TRK_CHECK_AUTODIAL,			//dialing 
  TRK_PLAY_MANUAL_HINT,			//paly : "press start key to begin fax" 
  TRK_CHECK_MANUAL_PLAY_START,  //check whether playback is complete 
  TRK_MANUAL_FAX_START,			// 
 
  TRK_CHECK_FAX_PROCESS,		//talking... 
  TRK_CHECK_FAX_END,			//check fax result 
  TRK_HANGUP					//hang up 
}; 
 
enum{ 
	FAX_IDLE,					//idle 
	FAX_START,					//start fax 
	FAX_CHECK_END,				//sending/receiving fax 
	FAX_CHECK_STOP				//stop fax 
}; 
  
typedef struct tagCH_INFO{ 
	char pChErrMsg[300]; 
	char fnRcvFaxFile[250]; 
	char PhoNum[20]; 
	char Page[10]; 
	char GetID[30]; 
	int  MaxFaxSpeed; 
	int  Direction; 
	int  Go; 
	int  OffLine; 
	int  Step; 
	int  Mode;					// 0 : Auto Send/Rcv , 1 : Manual Send 
	int  Fax_Answered; 
	char    szRecPathFile[250];//destination file  
	char    szSendPathFile[250];//send ffile 
	char	bHaveStartPage;	//start page 
	char	nStartPage; 
	char	nEndPage; 
 
	char	ucCheckEnd; 
	int		nTrunkch; 
}CH_INFO; 
 
typedef struct{ 
	int		nShow;		//fax mode 
	BOOL	EnCalled;				// flag whether a call is allowed 
    int		lineState;				// channel state 
	char	pChErrMsg[250];		// error message 
	char	pPhoNum[30]; 
	char	pCallerId[30]; 
	char	dtmf; 
	int		toFaxCh; 
	unsigned long dwTimeOut;	// overtime 
	int		Step;					// state of current channel 
	int		Fax_Answered; 
} TRUNK_STRUCT; 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CAtrkFaxDlg dialog 
 
class CAtrkFaxDlg : public CDialog 
{ 
public: 
	CFirstDlg	m_firstDlg; 
	CSecondDlg	m_secondDlg; 
	CThirdDlg	m_thirdDlg; 
	CForthDlg	m_forthDlg; 
	void		AutoSendFaxEx(); 
// Construction 
public: 
	CAtrkFaxDlg(CWnd* pParent = NULL);	// standard constructor 
	virtual ~CAtrkFaxDlg(); 
// Dialog Data 
	//{{AFX_DATA(CAtrkFaxDlg) 
	enum { IDD = IDD_ATRKFAX_DIALOG }; 
	CListBox	m_ListBox; 
	CComboBox	m_cmbFaxCh; 
	CComboBox	m_cmbCurCh; 
	CTabCtrl	m_TabCtrl; 
	CListCtrl	m_TrkChList; 
	CListCtrl	m_FaxChList; 
	int		m_AutoFaxMode; 
	int		m_MaxFaxSpeed; 
	CString	m_strManSendFaxFile; 
	CString	m_strRecordFile; 
	CString	m_strAppendSendFile; 
	BOOL	m_bMultiFax; 
	BOOL	m_bSetMixer; 
	int		m_bHowFile; 
	CString	m_strSendPathFile; 
	int		m_nStartPage; 
	int		m_nEndPage; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CAtrkFaxDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CAtrkFaxDlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnRadioMaxSpeed2(); 
	afx_msg void OnRadioMaxSpeed3(); 
	afx_msg void OnRadioMaxSpeed1(); 
	afx_msg void OnAutoRcvPathButton(); 
	afx_msg void OnDestroy(); 
	afx_msg void OnTimer(UINT nIDEvent); 
	afx_msg void OnAppend(); 
	afx_msg void OnSelfn(); 
	afx_msg void OnCheckStartPage(); 
	afx_msg void OnButtonStopFax(); 
	afx_msg void OnButton1(); 
	afx_msg void OnButton2(); 
	afx_msg void OnViewmansendfaxfile(); 
	afx_msg void OnAutocall(); 
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); 
	afx_msg void OnSelchangingTab1(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void AutoSendFax(); 
	afx_msg void OnBUTTONAppendSend(); 
	afx_msg void OnButtonAppend(); 
	afx_msg void OnCHECKMultiChRec(); 
	afx_msg void OnCHECKSetRexMixer(); 
	afx_msg void OnSingleFile(); 
	afx_msg void OnMultiFile(); 
	afx_msg void OnMultiFileSetPage(); 
	afx_msg void OnBtnShowFile(); 
	afx_msg void OnButtonAddin(); 
	afx_msg void OnButtonDel(); 
	afx_msg void OnSelchangeListBoxShow(); 
	afx_msg void OnDblclkListBoxShow(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
private: 
	void WriteLog(char* szLog); 
 
	char m_fnAppendFaxFile[250]; 
	int  m_nTotalCh; 
	char m_szErrMsg[200]; 
 
	//char m_szSendFaxFile[MAX_PATH]; 
	//char m_szManSendFaxFile[MAX_PATH]; 
	FAX_FILE_SCT	ffSCT[50]; 
	int				m_nSCTNumber; 
 
	char			m_szSendMultiPath[300]; 
	char			m_szSendMultiFile[1000]; 
 
 
	CH_INFO m_FaxCh[500]; 
	TRUNK_STRUCT m_ATrkCh[500]; 
	char m_szCurPath[MAX_PATH]; 
	FILE *m_LogFile; 
	BOOL m_bLog; 
 
	int		m_nTabShow;	//added by xxh for tabshow 
	//void GetStartPage(); 
	void myUpDateATrunkChListCtrl(); 
	void myUpdateChInfoList(); 
	void myScanFaxCh(); 
	void myScanATrunkCh(); 
	void myMakeFaxFile(char* fnsrcbmp, char* fnfax); 
	BOOL myInitFaxBoard(); 
	int  myFindAnIdleCh(); 
	void myDrawSelect(int x, int y, Img_Block* pImg); 
	void InitATrunkListCtrl(); 
	void InitChInfoList(); 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_ATRKFAXDLG_H__31DCFE09_B65C_11D4_9FD6_000021F39F78__INCLUDED_)