www.pudn.com > agentnet.zip > AgentNetClientDlg.h


// AgentNetClientDlg.h : header file 
// 
 
#if !defined(AFX_AGENTNETCLIENTDLG_H__19E1B59C_33FB_4899_8A47_38CC31A8074F__INCLUDED_) 
#define AFX_AGENTNETCLIENTDLG_H__19E1B59C_33FB_4899_8A47_38CC31A8074F__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
class CLoginDlg; 
class CToServerSocket; 
class CMsg; 
struct IAgentEx; 
struct IAgentCharacterEx; 
class AgentNotifySink; 
 
#include  // SAPI is defined here 
#include     // Contains definitions of SAPI functions定义 
 
#include "pop3.h" 
#include "mailmessage.h" 
struct stuThreadInfo 
{ 
public: 
	BOOL m_bUserSet; 
	HWND m_hWnd; 
	CString m_strFrom; 
	CString m_strSubject; 
	CString m_strBody; 
	int m_iMsgNumber; 
	BOOL m_bProcessingMailThread; 
 
	CString m_strMailServer; 
	CString m_strMailAccount; 
	CString m_strMailPassword; 
 
}; 
///////////////////////////////////////////////////////////////////////////// 
// CAgentNetClientDlg dialog 
 
class CAgentNetClientDlg : public CDialog 
{ 
// Construction 
public: 
	void ProcessMailDone(); 
	BOOL m_bProcessMailThread; 
	void InitSetup(); 
	struct stuSetup 
	{ 
		CString strAgentCharPath; 
		CString strServerIpAddress; 
		CString strMailAccount; 
		CString strMailServer; 
		CString strMailPassword; 
	}m_stuSetup; 
 
 
	void ProcessAnswerExit(); 
	BOOL m_bAnswer; 
	void ProcessExit(); 
	BOOL m_bWantExit; 
	void ProcessNoMail(); 
	void ProcessReadMail(); 
	void ProcessMailCannotLogin(); 
	void ProcessMailAccountNotSet(); 
	void InitMailAccount(); 
	stuThreadInfo m_stuThreadInfo; 
	BOOL m_bEnableTTS; 
	void SetHearCommand(BOOL bActive); 
	void AgentStop(); 
	void StartHearingTimer(); 
	void StartHearing(); 
	void ProcessRequestReadNews(CString strNews); 
	void ProcessReadNews(); 
	void ShowPopupMenu(); 
	void ExecuteSRCommand(ISpPhrase *pPhrase); 
	void ProcessRecoEvent(); 
	void ReleaseSR(); 
	void InitSR(); 
	void ReleaseTTS(); 
	void InitTTS(); 
	void AgentSpeak(CString strSpeak); 
	void AgentPlay(CString strAnimation); 
	void ReleaseAgent(); 
	BOOL InitAgent(); 
	void ProcessReceiveGeneralMsg(CString strUserName,CString strText); 
	void ProcessSendGeneralMsg(CString strToUserName,CString strText); 
	void LogOut(); 
	void ProcessBuddyLogout(CString strUserName); 
	void ProcessReplyListOnlineBuddy(CString strUserName); 
	void ReceiveMsg(); 
	void SendMsg(CMsg* pMsg); 
	void AskServerListOnlineBuddy(); 
	void InitOthers(); 
	void InitTree(); 
 
	//tts 语音合成 
	ISpVoice *m_cpTTSVoice; 
 
	//sr 语音识别 
	//SR COM 接口声明 
	CComPtr    m_cpEngine;         //sr engine 接口 
	CComPtr   m_cpRecoCtxt;       //recognize context 接口 
	CComPtr   m_cpCmdGrammar;     //grammar 接口 
      
	//客户机名称 
	CString m_strUserName; 
	CString m_strServerIPAddress; 
	UINT m_nServerTCPPort; 
 
	//套接字对象 
	CToServerSocket* m_pSocket; 
	//CSocketFile对象 
	CSocketFile* m_pFile; 
	//CArchive对象 
	CArchive* m_pArchiveIn; 
	CArchive* m_pArchiveOut; 
 
	//agent 指针 
	IAgentEx* m_pAgentEx; 
	IAgentCharacterEx* m_pCharacterEx; 
	AgentNotifySink* m_pSink; 
 
	long				m_lCharID; 
	long				m_lRequestID; 
 
 
	//图像列表 
	CImageList m_ImageList; 
 
	void InitSocket(); 
	CLoginDlg* m_pLoginDlg; 
	void OnReceive(); 
	CAgentNetClientDlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CAgentNetClientDlg) 
	enum { IDD = IDD_AGENTNETCLIENT_DIALOG }; 
	CTreeCtrl	m_TreeCtrl; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CAgentNetClientDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CAgentNetClientDlg) 
	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 OnTimer(UINT nIDEvent); 
	afx_msg void OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnMenuitemAgentHide(); 
	afx_msg void OnMenuitemAgentReadNews(); 
	afx_msg void OnMenuitemExitAgentNet(); 
	afx_msg void OnMenuitemReadClipborad(); 
	afx_msg void OnMenuitemStopAll(); 
	afx_msg void OnMenuitemSetCanSpeak(); 
	afx_msg void OnMenuitemSetCannotSpeak(); 
	afx_msg void OnMenuitemGetMail(); 
	afx_msg void OnMenuitemReadMail(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_AGENTNETCLIENTDLG_H__19E1B59C_33FB_4899_8A47_38CC31A8074F__INCLUDED_)