|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Definition of MContentLoaderInterface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MWMLCONTENTINTERFACE_H |
|
20 #define MWMLCONTENTINTERFACE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "BrsrStatusCodes.h" |
|
25 //#include "urlloader_loaderutils.h" |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * This class provides an interface for the resource loader client |
|
41 * to manage transactions |
|
42 * @lib resLoader.lib |
|
43 * @since 3.1 |
|
44 */ |
|
45 NONSHARABLE_CLASS(CWmlContentInterface) : public CBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CWmlContentInterface* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CWmlContentInterface(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * sends the partial response. |
|
63 * @since 3.1 |
|
64 * @return Kimono wide error code. |
|
65 */ |
|
66 TBrowserStatusCode WMLPartialResponse( const TUint16* aUri, |
|
67 TPtr8& aBody, |
|
68 void* aHeaders, |
|
69 TUint8* aContentTypeString, |
|
70 TUint8* aContentLocationString, |
|
71 TBool aNoStore, |
|
72 TUint8* aBoundaryString, |
|
73 TUint16* aLastModified, |
|
74 TUint16 aCharset, |
|
75 TUint8* aCharsetString, |
|
76 TUint aHttpStatus, |
|
77 TUint8 aMethod, |
|
78 TUint16 aTransId, |
|
79 TInt aChunkIndex, |
|
80 void* aCertInfo, |
|
81 TUint aContentLength, |
|
82 TInt aErr, |
|
83 void* aLoadContext, |
|
84 void* aPartialCallback ); |
|
85 void setPartialCallBack(void* callback){m_partialLoadCallback = callback;} |
|
86 void setLoadContext(void* loadcontext){m_loadContext = loadcontext;} |
|
87 void setTransId(TUint16 id){m_transId = id;} |
|
88 void setUrl(const TDesC& aUrl); |
|
89 |
|
90 void* getPartialCallBack(){return m_partialLoadCallback;} |
|
91 void* getLoadContext() {return m_loadContext;} |
|
92 TUint16 getTransId() {return m_transId;} |
|
93 HBufC* getUrl(){return m_resourceUrl;} |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * C++ default constructor. |
|
99 */ |
|
100 CWmlContentInterface(); |
|
101 |
|
102 /** |
|
103 * By default Symbian 2nd phase constructor is private. |
|
104 */ |
|
105 void ConstructL(); |
|
106 |
|
107 private: |
|
108 // Boolean to determine if 300 or 500 errors have associated content |
|
109 TBool iIsBodyPresent; |
|
110 |
|
111 void* m_partialLoadCallback; |
|
112 void* m_loadContext; |
|
113 TUint16 m_transId; |
|
114 HBufC* m_resourceUrl; |
|
115 }; |
|
116 |
|
117 #endif // MWMLCONTENTINTERFACE_H |
|
118 |
|
119 // End of File |