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