|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CUPNPMESSGETEST_H__ |
|
17 #define __CUPNPMESSGETEST_H__ |
|
18 |
|
19 |
|
20 // Include Files |
|
21 #include <e32base.h> |
|
22 #include <test/testexecuteserverbase.h> |
|
23 |
|
24 |
|
25 // Literal Constants. INI field names for parser tests |
|
26 _LIT(KDataChunk1, "DataChunk1"); |
|
27 _LIT(KParseExcessData, "ParseExcessData"); |
|
28 _LIT(KExpectedResponses, "ExpectedResponses"); |
|
29 _LIT(KExpectedRequests, "ExpectedRequests"); |
|
30 _LIT(KDataChunkCount, "DataChunkCount"); |
|
31 _LIT(KDateFormat,"%D%M%Y%/0%1%/1%2%/2%3%/3 %:0%H%:1%T%:2%S.%C%:3"); |
|
32 _LIT(KCRLF, "\r\n"); |
|
33 _LIT(KDataChunk, "DataChunk%d"); |
|
34 |
|
35 // Literal Constants. INI field names for composer tests |
|
36 _LIT(KRequestMethod, "RequestMethod"); |
|
37 _LIT(KUri, "URI"); |
|
38 _LIT(KRequestBodyPresence, "RequestBodyPresence"); |
|
39 _LIT(KBody, "Body"); |
|
40 _LIT(KNoOfHdrValPairs, "NoOfHdrValPairs"); |
|
41 _LIT(KNoOfHdrParamValPairs, "NoOfHdrParamValPairs"); |
|
42 _LIT(KResponseStatusCode, "ResponseStatusCode"); |
|
43 _LIT(KResponseStatusText, "ResponseStatusText"); |
|
44 _LIT(KResponseBodyPresence, "ResponseBodyPresence"); |
|
45 _LIT(KHeaderValuePair, "HeaderValuePair%d"); |
|
46 _LIT(KHeaderParamValPair, "HeaderParamValPair%d"); |
|
47 _LIT(KDirName, "C:\\logs\\UpnpMessageTestLogs\\"); |
|
48 |
|
49 // Literal constants. INI field names for codec decode tests |
|
50 _LIT(KRequestHeader, "RequestHeader"); |
|
51 |
|
52 // For RMBufChain |
|
53 static const TInt KMBuf_MBufSize = 128; |
|
54 static const TInt KMBuf_MinGrowth = 64; |
|
55 static const TInt KMBuf_GrowthThreshold = 40; |
|
56 static const TInt KMBuf_InitialAllocation = 128; |
|
57 |
|
58 |
|
59 const TInt KMaxHeaderNameLen = 128; |
|
60 const TInt KMaxHeaderValueLen = 128; |
|
61 const TChar backSlash = '\\'; |
|
62 |
|
63 const TInt KMaxBodyLen = 1024; |
|
64 const TInt KMaxMsgLen = 6144; |
|
65 |
|
66 const TChar colon = ':'; |
|
67 const TChar equal = '='; |
|
68 const TChar partIdx = '@'; |
|
69 |
|
70 const TInt KCMaxMsgLen = 6144; |
|
71 const TInt KMaxLen = 6144; |
|
72 |
|
73 |
|
74 class CUpnpMessageTest:public CTestServer |
|
75 { |
|
76 public: |
|
77 static CUpnpMessageTest* NewL(); |
|
78 CUpnpMessageTest(); |
|
79 ~CUpnpMessageTest(); |
|
80 |
|
81 virtual CTestStep* CreateTestStep(const TDesC& aStepName); |
|
82 |
|
83 private: |
|
84 const TPtrC ServerName(); |
|
85 |
|
86 private: |
|
87 CTestStep *iTestStep; |
|
88 }; |
|
89 // Function Prototypes |
|
90 GLDEF_C TInt E32Main(); |
|
91 |
|
92 |
|
93 #endif // __CUPNPMESSGETEST_H__ |
|
94 |
|
95 |