williamr@2
|
1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
/**
|
williamr@2
|
17 |
@file CRxData.h
|
williamr@2
|
18 |
@warning : This file contains Rose Model ID comments - please do not delete
|
williamr@2
|
19 |
*/
|
williamr@2
|
20 |
|
williamr@2
|
21 |
#ifndef __CRXDATA_H__
|
williamr@2
|
22 |
#define __CRXDATA_H__
|
williamr@2
|
23 |
|
williamr@2
|
24 |
// System includes
|
williamr@2
|
25 |
#include <e32base.h>
|
williamr@2
|
26 |
#include <http/framework/cprottransaction.h>
|
williamr@2
|
27 |
#include <http/mhttpdatasupplier.h>
|
williamr@2
|
28 |
#include <http/rhttpsession.h> // this include is needed to ensure that the <rhttp.inl> is compiled by gcc...
|
williamr@2
|
29 |
|
williamr@2
|
30 |
// Forward declarations
|
williamr@2
|
31 |
class MRxDataObserver;
|
williamr@2
|
32 |
|
williamr@2
|
33 |
|
williamr@2
|
34 |
//##ModelId=3B1E52AB0087
|
williamr@2
|
35 |
class CRxData : public CBase, public MHTTPDataSupplier
|
williamr@2
|
36 |
/**
|
williamr@2
|
37 |
An abstract base class for the decoding of response data received by a
|
williamr@2
|
38 |
protocol handler.
|
williamr@2
|
39 |
@publishedAll
|
williamr@2
|
40 |
@released
|
williamr@2
|
41 |
*/
|
williamr@2
|
42 |
{
|
williamr@2
|
43 |
public:
|
williamr@2
|
44 |
|
williamr@2
|
45 |
/** Intended Usage: Destructor - cleans up and releases resources to the system
|
williamr@2
|
46 |
*/
|
williamr@2
|
47 |
IMPORT_C
|
williamr@2
|
48 |
//##ModelId=3B1E52AB00ED
|
williamr@2
|
49 |
virtual ~CRxData();
|
williamr@2
|
50 |
|
williamr@2
|
51 |
/** Intended Usage: Obtain the protocol transaction whose request part is represented
|
williamr@2
|
52 |
as encoded data by this object.
|
williamr@2
|
53 |
@return The protocol transaction object
|
williamr@2
|
54 |
*/
|
williamr@2
|
55 |
IMPORT_C
|
williamr@2
|
56 |
//##ModelId=3B1E52AB00EC
|
williamr@2
|
57 |
CProtTransaction& ProtTrans();
|
williamr@2
|
58 |
|
williamr@2
|
59 |
public:
|
williamr@2
|
60 |
|
williamr@2
|
61 |
/** Intended Usage: Resets the received data object to its initial state following
|
williamr@2
|
62 |
construction. This method must be implemented for specific sub-
|
williamr@2
|
63 |
classes of received data.
|
williamr@2
|
64 |
@post The object is reset.
|
williamr@2
|
65 |
*/
|
williamr@2
|
66 |
//##ModelId=3BA60048014B
|
williamr@2
|
67 |
virtual void ResetRxData() = 0;
|
williamr@2
|
68 |
|
williamr@2
|
69 |
protected:
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/** Intended Usage: Default constructor - creates an Rx data object not associated
|
williamr@2
|
72 |
with any protocol transaction.
|
williamr@2
|
73 |
*/
|
williamr@2
|
74 |
IMPORT_C
|
williamr@2
|
75 |
//##ModelId=3A914E5F008F
|
williamr@2
|
76 |
CRxData();
|
williamr@2
|
77 |
|
williamr@2
|
78 |
/** Intended Usage: Normal constructor, of a CRxData that corresponds to the supplied
|
williamr@2
|
79 |
protocol transaction, and which sends status updates to the supplied
|
williamr@2
|
80 |
observer interface,
|
williamr@2
|
81 |
@param aProtTrans (in) The transaction for which this object
|
williamr@2
|
82 |
represents the transmitted data.
|
williamr@2
|
83 |
@param aObserver (in) The object's observer.
|
williamr@2
|
84 |
*/
|
williamr@2
|
85 |
IMPORT_C CRxData(CProtTransaction& aProtTrans, MRxDataObserver& aObserver);
|
williamr@2
|
86 |
|
williamr@2
|
87 |
/** Intended Usage: Second phase construction, default
|
williamr@2
|
88 |
*/
|
williamr@2
|
89 |
IMPORT_C
|
williamr@2
|
90 |
//##ModelId=3B1E52AB00BA
|
williamr@2
|
91 |
void ConstructL();
|
williamr@2
|
92 |
|
williamr@2
|
93 |
protected:
|
williamr@2
|
94 |
|
williamr@2
|
95 |
/** The protocol transaction for which this object represents the encoded received data
|
williamr@2
|
96 |
*/
|
williamr@2
|
97 |
//##ModelId=3B1E52AB00B2
|
williamr@2
|
98 |
CProtTransaction* iProtTrans;
|
williamr@2
|
99 |
|
williamr@2
|
100 |
/** This object's observer, to whom we forward status information
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
//##ModelId=3B1E7738028B
|
williamr@2
|
103 |
MRxDataObserver* iObserver;
|
williamr@2
|
104 |
|
williamr@2
|
105 |
private: // methods
|
williamr@2
|
106 |
|
williamr@2
|
107 |
/** Intended Usage: Reserve a slot in the v-table to preserve future BC
|
williamr@2
|
108 |
*/
|
williamr@2
|
109 |
//##ModelId=3C4C37DA0007
|
williamr@2
|
110 |
inline virtual void Reserved1();
|
williamr@2
|
111 |
|
williamr@2
|
112 |
/** Intended Usage: Reserve a slot in the v-table to preserve future BC
|
williamr@2
|
113 |
*/
|
williamr@2
|
114 |
//##ModelId=3C4C37D903DB
|
williamr@2
|
115 |
inline virtual void Reserved2();
|
williamr@2
|
116 |
};
|
williamr@2
|
117 |
|
williamr@2
|
118 |
|
williamr@2
|
119 |
inline void CRxData::Reserved1()
|
williamr@2
|
120 |
{}
|
williamr@2
|
121 |
inline void CRxData::Reserved2()
|
williamr@2
|
122 |
{}
|
williamr@2
|
123 |
|
williamr@2
|
124 |
|
williamr@2
|
125 |
#endif // __CRXDATA_H__
|
williamr@4
|
126 |
|