1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 #if !defined(AFX_RUNTESTSSHEET_H__44CEA289_11C4_11D3_A505_00A0C949ADAC__INCLUDED_)
26 #define AFX_RUNTESTSSHEET_H__44CEA289_11C4_11D3_A505_00A0C949ADAC__INCLUDED_
30 #endif // _MSC_VER > 1000
31 // RunTestsSheet.h : header file
34 /////////////////////////////////////////////////////////////////////////////
37 #include "ExecutionPage.h"
38 #include "OutputPage.h"
39 #include "SummaryPage.h"
40 #include "Properties.h"
42 #include "eCosPropertySheet.h"
45 class CRunTestsSheet : public CeCosPropertySheet
47 DECLARE_DYNAMIC(CRunTestsSheet)
48 enum Status {Running, Stopping, Stopped};
53 typedef void (CALLBACK CBFunc)(CProperties*,bool bSave);
54 CRunTestsSheet(LPCTSTR pszCaption=_T("Run Tests"), CWnd* pParentWnd = NULL, UINT iSelectPage = 0, CBFunc *pInitFunc=0, CRunTestsSheet **ppSheet=0);
59 CeCosTest::ExecutionParameters m_ep;
62 int m_nDownloadTimeout;
64 int m_nDownloadTimeoutType;
68 String m_strLocalTCPIPHost;
69 int m_nLocalTCPIPPort;
71 String m_strResourceHost;
74 static void CALLBACK RunLocalFunc(void *pParam);
75 static void CALLBACK RunRemoteFunc(void *pParam);
79 void SetTarget(LPCTSTR pszTarget);
80 void SetResetNone() { m_nReset = RESET_NONE; };
82 // ClassWizard generated virtual function overrides
83 //{{AFX_VIRTUAL(CRunTestsSheet)
85 virtual BOOL OnInitDialog();
86 virtual BOOL PreTranslateMessage(MSG* pMsg);
87 virtual int DoModal();
89 virtual void PostNcDestroy();
95 virtual ~CRunTestsSheet();
97 enum AffinityType { BottomRight, TopLeft, TopRight, BottomLeft, Stretch};
98 void MoveWindow(CWnd *pWnd,AffinityType Affinity,bool bRepaint=true);
99 CRect GetWindowOffset(CWnd *pWnd);
100 // Generated message map functions
102 CRunTestsSheet ** m_ppSheet;
104 bool m_bHideRemoteControls;
105 static DWORD CALLBACK X10ThreadFunc (void *pParam);
106 CString m_strPlacement;
113 CRect m_rcPrev,m_rcOffset;
114 bool m_bAllowResizing;
116 void * m_InitFuncParam;
117 static void CALLBACK TestOutputCallback(void *pParam,LPCTSTR psz);
118 CTestResource * m_pResource;
119 CRITICAL_SECTION m_CS;
120 int m_nTestsToComplete;
121 static void CALLBACK RunCallback(void *pParam);
124 CExecutionPage executionpage;
126 void Populate (LPCTSTR pszFile,bool bSelect=true);
127 void HideRemoteControls();
128 String m_strRemoteHost;
130 COutputPage outputpage;
131 CSummaryPage summarypage;
132 //{{AFX_MSG(CRunTestsSheet)
133 afx_msg void OnRun();
134 afx_msg void OnProperties();
135 afx_msg void OnClose();
136 afx_msg LRESULT OnTestOutput(WPARAM wParam, LPARAM lParam);
137 afx_msg LRESULT OnTestsComplete(WPARAM wParam, LPARAM lParam);
138 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
139 afx_msg void OnSize(UINT nType, int cx, int cy);
140 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
141 afx_msg void OnTimer(UINT nIDEvent);
143 afx_msg LRESULT OnKickIdle(WPARAM, LPARAM);
144 DECLARE_MESSAGE_MAP()
147 /////////////////////////////////////////////////////////////////////////////
149 //{{AFX_INSERT_LOCATION}}
150 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
152 #endif // !defined(AFX_RUNTESTSSHEET_H__44CEA289_11C4_11D3_A505_00A0C949ADAC__INCLUDED_)