[32] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include "SAXContentHandlerImpl.h"
|
---|
| 4 | #include <string>
|
---|
| 5 |
|
---|
| 6 | #include "WindowData.h"
|
---|
[105] | 7 | #include "TestResults.h"
|
---|
[32] | 8 |
|
---|
| 9 | class LogParser : public SAXContentHandlerImpl
|
---|
| 10 | {
|
---|
| 11 | private:
|
---|
[142] | 12 | static const int defaultMsgDelay = 500;
|
---|
[32] | 13 | WindowData * currentWindow;
|
---|
| 14 | WindowData * currentParent;
|
---|
| 15 |
|
---|
| 16 | int msgType;
|
---|
| 17 | LPARAM lParam;
|
---|
| 18 | WPARAM wParam;
|
---|
| 19 |
|
---|
[104] | 20 | boolean useDefaultDelay;
|
---|
[32] | 21 | int delay;
|
---|
| 22 |
|
---|
| 23 | void sendMessage(HWND hwnd);
|
---|
| 24 |
|
---|
[104] | 25 | _TCHAR * runCommand;
|
---|
[163] | 26 | _TCHAR * workingPath;
|
---|
[104] | 27 | unsigned int startupTime;
|
---|
| 28 | HANDLE hProcess;
|
---|
| 29 |
|
---|
[105] | 30 | std::wstring sessionId;
|
---|
| 31 | RESULT result;
|
---|
| 32 | unsigned int currentMessage;
|
---|
| 33 |
|
---|
| 34 | TestResults * results;
|
---|
| 35 |
|
---|
[142] | 36 | std::wstring expectedValue;
|
---|
| 37 | std::wstring actualFile;
|
---|
| 38 | std::wstring expectedFile;
|
---|
| 39 |
|
---|
[32] | 40 | public:
|
---|
[105] | 41 | LogParser(_TCHAR * runCommand, unsigned int startupChar, TestResults * results, bool useDefaultDelay = false);
|
---|
[32] | 42 | ~LogParser(void);
|
---|
| 43 |
|
---|
| 44 | virtual HRESULT STDMETHODCALLTYPE startElement(
|
---|
| 45 | wchar_t __RPC_FAR *pwchNamespaceUri,
|
---|
| 46 | int cchNamespaceUri,
|
---|
| 47 | wchar_t __RPC_FAR *pwchLocalName,
|
---|
| 48 | int cchLocalName,
|
---|
| 49 | wchar_t __RPC_FAR *pwchRawName,
|
---|
| 50 | int cchRawName,
|
---|
| 51 | MSXML2::ISAXAttributes __RPC_FAR *pAttributes);
|
---|
| 52 |
|
---|
| 53 | virtual HRESULT STDMETHODCALLTYPE endElement(
|
---|
| 54 | wchar_t __RPC_FAR *pwchNamespaceUri,
|
---|
| 55 | int cchNamespaceUri,
|
---|
| 56 | wchar_t __RPC_FAR *pwchLocalName,
|
---|
| 57 | int cchLocalName,
|
---|
| 58 | wchar_t __RPC_FAR *pwchRawName,
|
---|
| 59 | int cchRawName);
|
---|
| 60 |
|
---|
| 61 | std::wstring GetAttributeValue(MSXML2::ISAXAttributes __RPC_FAR *pAttributes,
|
---|
| 62 | std::wstring name, std::wstring defvalue);
|
---|
| 63 |
|
---|
| 64 |
|
---|
| 65 | int getDefaultMsgDelay();
|
---|
[163] | 66 |
|
---|
| 67 | void setWorkingPath(TCHAR * workingPath);
|
---|
[32] | 68 | };
|
---|