Mercurial > flash_v2
comparison host/tools/testtool/win32/RunTestsSheet.h @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | |
| children | 6736c52df507 |
comparison
equal
deleted
inserted
replaced
| 75:41bf073c0c32 | 76:435cced73e2f |
|---|---|
| 1 //####COPYRIGHTBEGIN#### | |
| 2 // | |
| 3 // ---------------------------------------------------------------------------- | |
| 4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | |
| 5 // | |
| 6 // This program is part of the eCos host tools. | |
| 7 // | |
| 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) | |
| 11 // any later version. | |
| 12 // | |
| 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 | |
| 16 // more details. | |
| 17 // | |
| 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. | |
| 21 // | |
| 22 // ---------------------------------------------------------------------------- | |
| 23 // | |
| 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_ | |
| 27 | |
| 28 #if _MSC_VER > 1000 | |
| 29 #pragma once | |
| 30 #endif // _MSC_VER > 1000 | |
| 31 // RunTestsSheet.h : header file | |
| 32 // | |
| 33 | |
| 34 ///////////////////////////////////////////////////////////////////////////// | |
| 35 // CRunTestsSheet | |
| 36 #include "ExecutionPage.h" | |
| 37 #include "OutputPage.h" | |
| 38 #include "SummaryPage.h" | |
| 39 #include "Properties.h" | |
| 40 #include "eCosTest.h" | |
| 41 #include "eCosPropertySheet.h" | |
| 42 | |
| 43 class CTestResource; | |
| 44 class CRunTestsSheet : public CeCosPropertySheet | |
| 45 { | |
| 46 DECLARE_DYNAMIC(CRunTestsSheet) | |
| 47 enum Status {Running, Stopping, Stopped}; | |
| 48 Status m_Status; | |
| 49 // Construction | |
| 50 public: | |
| 51 | |
| 52 typedef void (CALLBACK CBFunc)(CProperties*,bool bSave); | |
| 53 CRunTestsSheet(LPCTSTR pszCaption=_T("Run Tests"), CWnd* pParentWnd = NULL, UINT iSelectPage = 0, CBFunc *pInitFunc=0, CRunTestsSheet **ppSheet=0); | |
| 54 | |
| 55 // Attributes | |
| 56 public: | |
| 57 protected: | |
| 58 CeCosTest::ExecutionParameters m_ep; | |
| 59 CString m_strTarget; | |
| 60 int m_nTimeout; | |
| 61 int m_nDownloadTimeout; | |
| 62 int m_nTimeoutType; | |
| 63 int m_nDownloadTimeoutType; | |
| 64 bool m_bRemote; | |
| 65 bool m_bSerial; | |
| 66 int m_nBaud; | |
| 67 CString m_strLocalTCPIPHost; | |
| 68 int m_nLocalTCPIPPort; | |
| 69 int m_nReset; | |
| 70 CString m_strResourceHost; | |
| 71 int m_nResourcePort; | |
| 72 CString m_strReset; | |
| 73 static void CALLBACK RunLocalFunc(void *pParam); | |
| 74 static void CALLBACK RunRemoteFunc(void *pParam); | |
| 75 | |
| 76 // Operations | |
| 77 public: | |
| 78 void SetTarget(LPCTSTR pszTarget); | |
| 79 // Overrides | |
| 80 // ClassWizard generated virtual function overrides | |
| 81 //{{AFX_VIRTUAL(CRunTestsSheet) | |
| 82 public: | |
| 83 virtual BOOL OnInitDialog(); | |
| 84 virtual BOOL PreTranslateMessage(MSG* pMsg); | |
| 85 virtual int DoModal(); | |
| 86 protected: | |
| 87 virtual void PostNcDestroy(); | |
| 88 //}}AFX_VIRTUAL | |
| 89 | |
| 90 // Implementation | |
| 91 public: | |
| 92 CProperties m_prop; | |
| 93 virtual ~CRunTestsSheet(); | |
| 94 | |
| 95 enum AffinityType { BottomRight, TopLeft, TopRight, BottomLeft, Stretch}; | |
| 96 void MoveWindow(CWnd *pWnd,AffinityType Affinity,bool bRepaint=true); | |
| 97 CRect GetWindowOffset(CWnd *pWnd); | |
| 98 // Generated message map functions | |
| 99 protected: | |
| 100 CRunTestsSheet ** m_ppSheet; | |
| 101 bool m_bModal; | |
| 102 bool m_bHideRemoteControls; | |
| 103 static DWORD CALLBACK X10ThreadFunc (void *pParam); | |
| 104 CString m_strPlacement; | |
| 105 bool m_bHideTarget; | |
| 106 UINT m_nRemotePort; | |
| 107 bool m_bFarmed; | |
| 108 CString m_strPort; | |
| 109 int m_cyMin; | |
| 110 int m_cxMin; | |
| 111 CRect m_rcPrev,m_rcOffset; | |
| 112 bool m_bAllowResizing; | |
| 113 CBFunc* m_pInitFunc; | |
| 114 void * m_InitFuncParam; | |
| 115 static void CALLBACK TestOutputCallback(void *pParam,LPCTSTR psz); | |
| 116 CTestResource * m_pResource; | |
| 117 CRITICAL_SECTION m_CS; | |
| 118 int m_nTestsToComplete; | |
| 119 static void CALLBACK RunCallback(void *pParam); | |
| 120 int m_nNextToSubmit; | |
| 121 void SubmitTests(); | |
| 122 CExecutionPage executionpage; | |
| 123 public: | |
| 124 void Populate (LPCTSTR pszFile,bool bSelect=true); | |
| 125 void HideRemoteControls(); | |
| 126 CString m_strRemoteHost; | |
| 127 private: | |
| 128 static LPCTSTR CALLBACK GetFn (void *pObj) { return (LPCTSTR)*(CString *)pObj; } | |
| 129 static void CALLBACK PutFn (void *pObj,LPCTSTR psz) { *(CString *)pObj=psz; } | |
| 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); | |
| 142 //}}AFX_MSG | |
| 143 afx_msg LRESULT OnKickIdle(WPARAM, LPARAM); | |
| 144 DECLARE_MESSAGE_MAP() | |
| 145 }; | |
| 146 | |
| 147 ///////////////////////////////////////////////////////////////////////////// | |
| 148 | |
| 149 //{{AFX_INSERT_LOCATION}} | |
| 150 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. | |
| 151 | |
| 152 #endif // !defined(AFX_RUNTESTSSHEET_H__44CEA289_11C4_11D3_A505_00A0C949ADAC__INCLUDED_) |
