1.1 --- a/epoc32/include/http/framework/cprottransaction.h Tue Mar 16 16:12:26 2010 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,210 +0,0 @@
1.4 -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -
1.20 -
1.21 -/**
1.22 - @file CProtTransaction.h
1.23 - @warning : This file contains Rose Model ID comments - please do not delete
1.24 -*/
1.25 -
1.26 -#ifndef __CPROTTRANSACTION_H__
1.27 -#define __CPROTTRANSACTION_H__
1.28 -
1.29 -// System includes
1.30 -#include <e32base.h>
1.31 -#include <http/rhttptransaction.h>
1.32 -
1.33 -// Forward declarations
1.34 -class CTxData;
1.35 -class CRxData;
1.36 -class MRxDataObserver;
1.37 -
1.38 -
1.39 -//##ModelId=3B1E52B30382
1.40 -class CProtTransaction : public CBase
1.41 -/**
1.42 -A representation of a transaction used by protocol handlers.
1.43 -This class is lower-level than the RHTTPTransaction class,
1.44 -since it owns objects that represent the request and response data as
1.45 -transmitted and received over a transport medium.
1.46 -@publishedAll
1.47 -@released
1.48 -*/
1.49 - {
1.50 -public: // Enums
1.51 -
1.52 -/** The TTransactionState type defines the states of a transaction.
1.53 -*/
1.54 - enum TTransactionState
1.55 - {
1.56 - /** Specifies that the transaction is pending servicing.
1.57 - */
1.58 - EPending = 0,
1.59 - /** Specifies that the transaction is being serviced - active.
1.60 - */
1.61 - EActive,
1.62 - /** Specifies that the transaction has been cancelled.
1.63 - */
1.64 - ECancelled,
1.65 - /** Specifies that the transaction has completed.
1.66 - */
1.67 - ECompleted
1.68 - };
1.69 -
1.70 -public:
1.71 -
1.72 -/**
1.73 - Intended Usage: Destructor - cleans up and releases resources to the system
1.74 -*/
1.75 - //##ModelId=3B1E52B40031
1.76 - IMPORT_C virtual ~CProtTransaction();
1.77 -
1.78 -public: // accessors
1.79 -
1.80 -/**
1.81 - Provides the state of the transaction, e.g. pending,
1.82 - active, etc.
1.83 - @return A enum specifying the state of the transaction.
1.84 -*/
1.85 - //##ModelId=3C4C37E50306
1.86 - TTransactionState TransactionState() const;
1.87 -
1.88 -/**
1.89 - Sets the state of the transaction.
1.90 - @param aState The state that the transaction is in.
1.91 - @post The state of the transaction has been updated.
1.92 -*/
1.93 - //##ModelId=3C4C37E502D4
1.94 - void SetTransactionState(TTransactionState aState);
1.95 -
1.96 -/**
1.97 - Resets the Rx data object. The Rx data object must be
1.98 - created again to be used.
1.99 - @post The Rx data objects has been reset.
1.100 -*/
1.101 - //##ModelId=3C4C37E502CA
1.102 - IMPORT_C void ResetRxData();
1.103 -
1.104 -/**
1.105 - Resets the Tx data object. The Tx data object must be
1.106 - created again to be used.
1.107 - @post The Tx data objects has been reset.
1.108 -*/
1.109 - //##ModelId=3C4C37E502C0
1.110 - IMPORT_C void ResetTxData();
1.111 -
1.112 -/**
1.113 - Obtain the API-level transaction to which this object
1.114 - corresponds to.
1.115 - @return The API-level transaction that this object corresponds to.
1.116 -*/
1.117 - //##ModelId=3B1E52B40013
1.118 - IMPORT_C RHTTPTransaction Transaction() const;
1.119 -
1.120 -/**
1.121 - Obtain the Transmit Data portion of the transaction.
1.122 - @return A reference to the Tx data object of the transaction.
1.123 -*/
1.124 - //##ModelId=3B1E52B40012
1.125 - IMPORT_C CTxData& TxData() const;
1.126 -
1.127 -/**
1.128 - Obtain the Receive Data portion of the transaction.
1.129 - @return A reference to the Rx data object of the transaction.
1.130 -*/
1.131 - //##ModelId=3B1E52B40009
1.132 - IMPORT_C CRxData& RxData() const;
1.133 -
1.134 -public: // Methods to be implemented by derived classes
1.135 -
1.136 -/**
1.137 - Intended Usage: Creates the appropriate CTxData object.
1.138 - @leave KErrNoMemory if there is not enough memory available to
1.139 - create the object.
1.140 -*/
1.141 - //##ModelId=3C4C37E502AC
1.142 - virtual void CreateTxDataL() =0;
1.143 -
1.144 -/**
1.145 - Intended Usage: Creates the appropriate CRxData object.
1.146 - @leave KErrNoMemory if there is not enough memory available to
1.147 - create the object.
1.148 - @param aObserver A reference to the observer for the Rx data object.
1.149 -*/
1.150 - //##ModelId=3C4C37E50284
1.151 - virtual void CreateRxDataL(MRxDataObserver& aObserver) =0;
1.152 -
1.153 -protected: // Methods
1.154 -
1.155 -/**
1.156 - Default constructor
1.157 -*/
1.158 - //##ModelId=3B1E52B303E6
1.159 - CProtTransaction();
1.160 -
1.161 -/**
1.162 - Normal constructor, of a CProtTransaction that corresponds to the
1.163 - supplied client transaction handle.
1.164 - @param aTrans (in) The client transaction handle.
1.165 -*/
1.166 - //##ModelId=3B1E52B303E7
1.167 - IMPORT_C CProtTransaction(RHTTPTransaction aTrans);
1.168 -
1.169 -protected: // Attributes
1.170 -
1.171 - /** The client transaction
1.172 - */
1.173 - //##ModelId=3B1E52B303D4
1.174 - RHTTPTransaction iTrans;
1.175 -
1.176 - /** The transmission data
1.177 - */
1.178 - //##ModelId=3B1E52B303CA
1.179 - CTxData* iTxData;
1.180 -
1.181 - /** The received data
1.182 - */
1.183 - //##ModelId=3B1E52B303C0
1.184 - CRxData* iRxData;
1.185 -
1.186 - /** Transaction state indicator.
1.187 - */
1.188 - //##ModelId=3C4C37E50247
1.189 - TTransactionState iTransactionState;
1.190 -
1.191 -private: // methods
1.192 -
1.193 -/**
1.194 - Intended Usage: Reserve a slot in the v-table to preserve future BC
1.195 - */
1.196 - //##ModelId=3C4C37E5026F
1.197 - inline virtual void Reserved1();
1.198 -
1.199 -/**
1.200 - Intended Usage: Reserve a slot in the v-table to preserve future BC
1.201 - */
1.202 - //##ModelId=3C4C37E50251
1.203 - inline virtual void Reserved2();
1.204 - };
1.205 -
1.206 -
1.207 -inline void CProtTransaction::Reserved1()
1.208 - {}
1.209 -inline void CProtTransaction::Reserved2()
1.210 - {}
1.211 -
1.212 -
1.213 -#endif // __CPROTTRANSACTION_H__