webservices/wscore/inc/senclientsession.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 "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:    Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 #ifndef SEN_CLIENTSESSION_H
       
    29 #define SEN_CLIENTSESSION_H
       
    30 
       
    31 // INCLUDES
       
    32 #include <e32base.h>
       
    33 #include <badesca.h>
       
    34 #include <flogger.h>
       
    35 
       
    36 #include "msenremoteserviceconsumer.h"
       
    37 #include "msenremotehostlet.h"
       
    38 #include "msenservicemanager.h"
       
    39 #include "msenremoteservicesession.h"
       
    40 #include "senpointermap.h"
       
    41 #include "senchunk.h"
       
    42 
       
    43 #include "sentransportbase.h"
       
    44 
       
    45 #include "msenmessagecontext.h" // application domain: Framework\inc
       
    46 #include "senmessagecontext.h"
       
    47 
       
    48 #include "sencontext.h"         // private: Framework\inc
       
    49 
       
    50 #include "RSenDocument.h"
       
    51 #include "senservicemanagerdefines.h"
       
    52 #include "senatomentry.h"
       
    53 #ifdef __ENABLE_ALR__
       
    54 #include "senmobilityobserver.h"
       
    55 #endif    //__ENABLE_ALR__
       
    56 
       
    57 // CONSTANTS
       
    58 const TInt KErrConsumerIdIsNull = 84;
       
    59 
       
    60 // FORWARD DECLARATIONS
       
    61 class CSenIdentifier;
       
    62 class CSenServiceSession;
       
    63 class CSenClientMessage;
       
    64 class CSenSoapEnvelope2;
       
    65 class TXmlEngElement;
       
    66 class TXmlEngDataContainer;
       
    67 class RSenDocument;
       
    68 class CSenMessageContext;
       
    69 class CSenServerContext;
       
    70 class RSenConnectionServerSession;
       
    71 class TFileTransferProgress;
       
    72 
       
    73 typedef RSenPointerMap<TInt, CSenClientMessage> RHostletRequestMap;
       
    74 
       
    75 //typedef RPointerArray<RMessage2> RTransactionArray;
       
    76 typedef RPointerArray<CSenClientMessage> RTransactionArray;
       
    77 typedef RPointerArray<TInt> RTransactionIdArray;
       
    78 
       
    79 
       
    80 NONSHARABLE_CLASS(CSenMessageResourceHandler): public CActive
       
    81     {
       
    82     friend class RSenConnectionServerSession;
       
    83     private:
       
    84     CSenMessageResourceHandler(TInt aTxnId, TBool aIncoming, TBool aIsSoap,
       
    85             TInt aProgress, RSenConnectionServerSession* aOwner);
       
    86     ~CSenMessageResourceHandler();
       
    87     void DoCancel();
       
    88     void RunL();
       
    89     TInt SetBuffer(const TDesC8& aSoapOrCid);
       
    90     
       
    91     private:
       
    92     TPckgBuf<TTransferProgress> iProgressData;
       
    93     HBufC8* iSoapOrCid;
       
    94     RSenConnectionServerSession* iOwner;
       
    95     CSenMessageResourceHandler* iNext;
       
    96     CSenMessageResourceHandler* iPrevious;
       
    97     };
       
    98     
       
    99 //class RSenConnectionServerSession: public RSessionBase
       
   100 NONSHARABLE_CLASS(RSenConnectionServerSession): public RSessionBase
       
   101     {
       
   102     public:
       
   103     TInt CreateSession(const RMessage2& aMessage);
       
   104     void SendFileProgress(TInt aTxnId, TBool aIncoming, TBool aIsSoap,
       
   105             const TDesC8& aSoapOrCid, TInt aProgress);
       
   106     void Remove(CSenMessageResourceHandler* aResourceHandler);
       
   107     void Close();
       
   108     
       
   109     TInt InitProgressObserver(const RMessage2& aMessage);
       
   110     TInt InitAuthObserver(const RMessage2& aMessage);
       
   111     TInt ReauthenticationNeeded(CSenChunk& aSenChunk);
       
   112         TInt InitCoBrandingObserver(const RMessage2& aMessage);
       
   113         TBool OnGetBrandIdL(  const TDesC8& aBrandIdListAsXmlSnippet, RBuf8& aSelectedBrandId);
       
   114 #ifdef __ENABLE_ALR__
       
   115         TInt InitMobilityObserver(const RMessage2& aMessage) ;
       
   116 	
       
   117         TInt PreferredCarrierAvailable( TAccessPointInfo& aOldAPInfo, TAccessPointInfo& aNewAPInfo, TBool& aIsUpgrade, TBool& aIsSeemLess) ;
       
   118     	
       
   119         TInt NewCarrierActive (TAccessPointInfo& aNewAPInfo, TBool& aIsSeamless ) ;
       
   120         TInt MobilityError( TInt& aError ) ;	
       
   121 #endif    //__ENABLE_ALR__
       
   122     private:
       
   123     CSenMessageResourceHandler* iFirst;
       
   124     };
       
   125 
       
   126 NONSHARABLE_CLASS(CSenConnAgentSync): public CActive
       
   127     {
       
   128     friend class RSenConnectionServerSession;
       
   129 private:
       
   130     CSenConnAgentSync();
       
   131     ~CSenConnAgentSync();
       
   132     void DoCancel();
       
   133     void RunL();
       
   134     void Start();
       
   135     };
       
   136 
       
   137 NONSHARABLE_CLASS(CSenBinaryData): public CBase
       
   138     {
       
   139     public:
       
   140         enum TSenBinaryDataType
       
   141             {
       
   142             EFile   = 1,
       
   143             EChunk  = 2
       
   144             };
       
   145 
       
   146         static CSenBinaryData* NewL(RChunk& aChunk, TDesC8& aCid, TInt aOffset, TInt aSize);
       
   147         static CSenBinaryData* NewLC(RChunk& aChunk, TDesC8& aCid, TInt aOffset, TInt aSize);
       
   148         static CSenBinaryData* NewL(RFs& aFs, RFile& aFile, TDesC8& aCid, TInt aOffset = 0, TInt aSize = 0);
       
   149         static CSenBinaryData* NewLC(RFs& aFs, RFile& aFile, TDesC8& aCid, TInt aOffset = 0, TInt aSize = 0);
       
   150             
       
   151         ~CSenBinaryData();
       
   152         
       
   153         RChunk& Chunk();
       
   154         RFile& File();
       
   155         TDesC8& Cid();
       
   156         TInt Offset();
       
   157         TInt Size();
       
   158         TSenBinaryDataType Type();
       
   159 
       
   160     protected: 
       
   161         CSenBinaryData(TInt aOffset, TInt aSize);
       
   162         void BaseConstructL(RChunk& aChunk, TDesC8& aCid);
       
   163         void BaseConstructL(RFs& aFs, RFile& aFile, TDesC8& aCid);
       
   164     
       
   165     private:
       
   166         RChunk              iChunk;
       
   167         
       
   168         RFs                 iFs;
       
   169         RFile               iFile;
       
   170         
       
   171         TSenBinaryDataType  iType;
       
   172         HBufC8*             ipCid;
       
   173         TInt                iOffset;
       
   174         TInt                iSize;
       
   175     };
       
   176 
       
   177 // CLASS DECLARATION
       
   178 #ifdef __ENABLE_ALR__
       
   179 class CSenClientSession : public CSession2, public MSenRemoteServiceConsumer, public MSenRemoteHostlet, public MMobilityProtocolResp
       
   180 #else
       
   181 class CSenClientSession : public CSession2, public MSenRemoteServiceConsumer, public MSenRemoteHostlet
       
   182 #endif
       
   183     {
       
   184     public: // Constructors and destructor
       
   185         
       
   186         static CSenClientSession* NewL( MSenServiceManager& aServer, CSenServerContext& aCtx );
       
   187         static CSenClientSession* NewLC( MSenServiceManager& aServer, CSenServerContext& aCtx );
       
   188 
       
   189         ~CSenClientSession();
       
   190 
       
   191         // Function from base classes
       
   192         
       
   193         // from CSession2
       
   194         void ServiceL(const RMessage2& aMessage);
       
   195 
       
   196         // from MSenRemoteServiceConsumer
       
   197         virtual const TDesC8& Id() const;
       
   198         CSenIdentifier& Identifier() const;
       
   199 
       
   200         TInt SetSessionL(MSenRemoteServiceSession& aServiceSession);
       
   201         TInt HandleMessageL(HBufC8* apMessage,
       
   202                             const TInt aTxnId,
       
   203                             MSenProperties* aResponseTransportProperties);
       
   204                             
       
   205         TInt HandleErrorL(HBufC8* apError,
       
   206                           const TInt aErrorCode,
       
   207                           const TInt aTxnId,
       
   208                           MSenProperties* aResponseTransportProperties);
       
   209 
       
   210         void SetStatusL(const TInt status);
       
   211         void FileProgress(TInt aTxnId, TBool aIncoming, TBool aIsSoap,
       
   212                 const TDesC8& aSoapOrCid, TInt aProgress);
       
   213         void TransferProgressForHostlet( TInt aTxnId, TBool aIsIncoming, TBool aIsSoap, const TDesC8& aSoapOrCid, TInt aProgress);
       
   214         void SetDataTrafficDetails( TSenDataTrafficDetails& aDetails); 
       
   215 
       
   216         MSenTransport& TransportL();
       
   217 
       
   218         TInt ProcessRequestFromConsumerL(const TDesC8& aMessage,
       
   219                                          const TInt aTxnId,
       
   220                                          MSenRemoteServiceConsumer& aConsumer); 
       
   221 
       
   222         TInt ChunkByTxnIdL(TInt aTxnId, CSenChunk*& aChunk);
       
   223         MSenMessageContext* MessageContextByTxnIdL(TInt aTxnId, TInt& aError);
       
   224 
       
   225         TInt OnServiceCompleteL(const TInt aTxnId, TInt aCompletionCode, const TDesC8& aDesc = KNullDesC8); 
       
   226         
       
   227         void StateChanged(TInt aState);
       
   228         
       
   229         TBool HasAuthenticationCallback();
       
   230         TInt ReauthenticationNeededL(CSenIdentityProvider*& aIdp);
       
   231         TBool OnGetBrandIdL(  const TDesC8& aBrandIdListAsXmlSnippet, RBuf8& aSelectedBrandId);
       
   232         TBool HasCoBrandingCallback();		
       
   233 #ifdef __ENABLE_ALR__
       
   234 		void ObserveMobiltyService(const RMessage2& aMessage) ;
       
   235 		void MigrateToPrefferedCarrierL(const RMessage2& aMessage) ;	
       
   236 		void PreferredCarrierAvailable( TAccessPointInfo aOldAPInfo,
       
   237 	                                        TAccessPointInfo aNewAPInfo,
       
   238 	                                        TBool aIsUpgrade,
       
   239 	                                        TBool aIsSeamless ) ;
       
   240 	    void Error( TInt aError );
       
   241 	    void NewCarrierActive( TAccessPointInfo aNewAPInfo, TBool aIsSeamless ) ;
       
   242 		void NewCarrierAcceptedL(const RMessage2& aMessage) ;		
       
   243 #endif //__ENABLE_ALR__
       
   244     protected: 
       
   245         CSenClientSession(MSenServiceManager& aServer, CSenServerContext& aCtx);
       
   246         void ConstructL();
       
   247 
       
   248         // New functions
       
   249         
       
   250         void PanicClient(const RMessagePtr2& aMessage,TInt aPanic) const;
       
   251         void InitializeL(const RMessage2& aMessage);
       
   252         void TransactionL(const RMessage2& aMessage);
       
   253         TInt SearchMsgChunk( const RMessage2& aMessage, CSenChunk*& aHit );
       
   254         void SendMsg( const RMessage2& aMessage ); // async
       
   255         void SendMsgL( const RMessage2& aMessage, CSenChunk& aSenChunk ); // async
       
   256         RFileLogger* Log() const;
       
   257         void InstallFrameworkL(const RMessage2& aMessage);
       
   258         void DissociateServiceL(const RMessage2& aMessage);
       
   259         void AssociateServiceL(const RMessage2& aMessage);
       
   260         void RegisterIdentityProviderL(const RMessage2& aMessage);
       
   261         void UnregisterIdentityProviderL(const RMessage2& aMessage);
       
   262         void RegisterServiceDescriptionL(const RMessage2& aMessage);
       
   263         void UnregisterServiceDescriptionL(const RMessage2& aMessage);
       
   264 
       
   265         /**
       
   266         * Searches and returns all service descriptions, which contain
       
   267         * matching fields (elements) with spesified service pattern.
       
   268         * Typical fields used in service pattern are Endpoint and 
       
   269         * Contract.
       
   270         */
       
   271         void ServiceDescriptionsByPatternL(const RMessage2& aMessage);
       
   272         /**
       
   273         * Searches and returns all service descriptions, which match
       
   274         * with specified Contract (typically some URI).
       
   275         */
       
   276         void ServiceDescriptionsByUriL(const RMessage2& aMessage);
       
   277 
       
   278         void IsReadyL(const RMessage2& aMessage);
       
   279         void HasFacetL(const RMessage2& aMessage);
       
   280         void CompleteServerMessagesOnOffL(const RMessage2& aMessage);
       
   281         void ReceiveServiceDescriptionL(const RMessage2& aMessage);
       
   282         void RequestServiceDescriptionL(const RMessage2& aMessage);
       
   283         void StartTransactionL(const RMessage2& aMessage);
       
   284         void TransactionCompletedL(const RMessage2& aMessage);
       
   285         void CancelSessionL(const RMessage2& aMessage);
       
   286         void TransportPropertiesL(const RMessage2& aMessage);
       
   287         void SetTransportPropertiesL(const RMessage2& aMessage);
       
   288     
       
   289         void EstablishHostletConnectionL(const RMessage2& aMessage);
       
   290         void AwaitHostletRequestL(const RMessage2& aMessage);
       
   291         void ProvideHostletResponseL(const RMessage2& aMessage);
       
   292 //        void AcquireHostletRequestHandleL(const RMessage2& aMessage);
       
   293         void MoveChunkL(const RMessage2& aMessage);
       
   294         void MoveFileL(const RMessage2& aMessage);
       
   295         void SendFileHandleL(const RMessage2& aMessage);
       
   296         TInt SendProgressToHostlet(const RMessage2& aMessage);
       
   297         CSenClientMessage* ClientMessageByPendingTxnIdL( TInt aTxnId);
       
   298 
       
   299     private:
       
   300     
       
   301         // Defines, whether this client session is a service connection (SC) or a hostlet connection (HC)
       
   302         enum TSessionType
       
   303             {
       
   304             ENotInitialized = 0,
       
   305             ERemoteConsumer_SC,
       
   306             ERemoteHostlet_HC
       
   307             };
       
   308 
       
   309         // User permission check states
       
   310         enum TestCase
       
   311             {
       
   312             ENotChecked = 0,
       
   313             EAccepted,
       
   314             ENotAccepted
       
   315             };
       
   316 
       
   317         // New functions
       
   318 
       
   319         /**
       
   320         * SessionValidity() method checks session validity 
       
   321         * @return KErrNone if session is ready and 
       
   322         *         its credentials (if any) are valid
       
   323         *
       
   324         *         KErrSenNotInitialized if session is not yet set 
       
   325         *         (iSession is NULL)
       
   326         *
       
   327         *         KErrConnectionInitializing if session's state  is new 
       
   328         *         (iStatus is KSenConnectionStatusNew)
       
   329         *
       
   330         *         KSenConnectionStatusExpired if session's state is initializing 
       
   331         *         (iStatus is KSenConnectionStatusNew)
       
   332         *
       
   333         *         KSenConnectionStatusExpired if session's state is expired 
       
   334         *         (iStatus is KSenConnectionStatusExpired)
       
   335         */
       
   336         TInt SessionValidity();
       
   337 
       
   338         TBool CheckValidity(const RMessage2 &aMessage);
       
   339         TBool CheckAllowRegisterL(TInt& aError, const RMessage2& aMessage, const TDesC8& aFrameworkId);
       
   340         TBool CheckAllowUnRegisterL(TInt& aError, const RMessage2& aMessage, const TDesC8& aFrameworkId);
       
   341         TBool CheckAllowUnRegisterL(TInt& aError, const RMessage2& aMessage);
       
   342         /**
       
   343         * ReleaseServiceSession is called in the destructor of this class to
       
   344         * make sure that framework spesific garbage collection for consumed 
       
   345         * service session will be executed. It is up to framework implementations
       
   346         * whether they need to cleanup (destroy) this service session which is
       
   347         * being here released.
       
   348         */
       
   349         TInt ReleaseServiceSession();
       
   350 
       
   351         /**
       
   352         * Method is called from destructor, to ensure that
       
   353         * all pending async requests get completed.
       
   354         *
       
   355         * Messages will be completed using ESenServRequestCancelled
       
   356         * operation code from TWsfServRqstOpCode enumeration defined
       
   357         * in SenServiceManagerDefines.h
       
   358         *
       
   359         * Internally, this method calls and TRAPS CleanupPendingMessagesL()
       
   360         * @return KErrNone or leave code, if CompletePendingMessagesL() fails.
       
   361         */
       
   362         TInt CompletePendingMessages(); 
       
   363         /**
       
   364         * Leaving variant of CleanupPendingMessages(), which includes
       
   365         * actual cleanup code.
       
   366         *
       
   367         * This version may be called if *cancel operation* is received
       
   368         * from client to cancel all pending -async- operations.
       
   369         */
       
   370         void CompletePendingMessagesL();
       
   371 
       
   372 		TInt TransactionIndex(TInt aTxnId);
       
   373         TInt ContextIndex(TInt aCtxId);
       
   374 
       
   375         RTransactionArray& Transactions();
       
   376         RTransactionIdArray& TxnIds();
       
   377         RHostletRequestMap& HostletRequestMap();
       
   378         
       
   379         TInt CompleteTransaction(TInt aErrorCode, CSenChunk& aChunk);
       
   380         TInt CompleteTransactionByCtxId(TInt aErrorCode, TInt aCtxId);
       
   381         TInt CompleteTransactionByIndex(TInt aErrorCode, TInt aTransactionIndex);
       
   382 
       
   383         TInt ReadChunkNameLC( const RMessage2& aMessage, TInt aIpcArgIndex, HBufC*& apChunkName );
       
   384 
       
   385         /**
       
   386         * Helper called by SC::ReceiveInitialize and HC:EstablishConnection
       
   387         * Instantiates a new XML service description object, which then will
       
   388         * parse the provided XML (serialized XML service description)
       
   389         * @param aSdAsXml is the input XML descriptor
       
   390         * @param apInitializer provides ref-to-ptr where new initializer 
       
   391         * (a XML service description) will be assigned, when method succeeds.
       
   392         * @param apConsumerPolicy is optional argument, which can be utilized
       
   393         * to provide consumer policy descriptor, when such is available.
       
   394         * @return KErrNone if session was initialized or 
       
   395         * otherwise some system-wide errorcode.
       
   396         */
       
   397         TInt ParseSessionInitializerL(CSenWSDescription*& apInitializer,
       
   398                                       const TDesC8& aSdAsXml,
       
   399                                       const TDesC8* apConsumerPolicy = NULL);
       
   400 
       
   401         /**
       
   402         * Helper called by SC::ReceiveInitialize and HC:EstablishConnection
       
   403         * Initializes the service session or returns an error.
       
   404         * @param aInitializer is the SD to be used in session initialization
       
   405         * @param aErrorMsg will contain error description, typically SOAP fault,
       
   406         * in case that (IDP / authentication) service spesific error occured
       
   407         * @return KErrNone if session was initialized or 
       
   408         * otherwise some system-wide errorcode.
       
   409         */
       
   410         TInt InitializeServiceSessionL(CSenWSDescription& aInitializer, HBufC8*& aErrorMsg);
       
   411 
       
   412         /**
       
   413         * Helper.
       
   414         * Reads a Service Description (buffer) from certain 
       
   415         * RMessage2 IPC ARGS indexes
       
   416         * @return KErrNone if buffer was successfully read
       
   417         * or otherwise some system-wide errorcode.
       
   418         */
       
   419         TInt ReadBufferFromRMessageL(const RMessage2& aMessage, 
       
   420                                      TInt aSdLengthIdx, 
       
   421                                      TInt aSdBufIdx,
       
   422                                      HBufC8*& aSdBuf);
       
   423 
       
   424         TInt ListBinaryElementsL(RArray<TXmlEngElement>& aElementArray,
       
   425                                  TXmlEngElement& aElement);
       
   426                                  
       
   427         TInt ParseMessageL(TInt aTransactionId,
       
   428                            const TDesC8& aRequest,
       
   429                            CSenSoapEnvelope2& aSoapEnvelope);
       
   430         TInt ParseMessageL(TInt aTransactionId,
       
   431                            const TDesC8& aRequest,
       
   432                            CSenAtomEntry& aAtomEntry);
       
   433         void AddCredentialL(const RMessage2& aMessage);
       
   434         void CredentialsL(const RMessage2& aMessage);
       
   435         void RemoveCredentialsL(const RMessage2& aMessage);
       
   436         
       
   437         void CancelRequestL(const RMessage2& aMessage);
       
   438         
       
   439         void DataTrafficDetails(const RMessage2& aMessage); 
       
   440         void ConnectionID(const RMessage2& aMessage);
       
   441         
       
   442         void ConnectionIdentityProviderL(const RMessage2& aMessage);
       
   443 //        CSenIdentityProvider* ConnectionIdentityProviderL();
       
   444         // Constantantness on the TInt return type has no meaning so prototype is modified 
       
   445         // Overrides TInt MSenRemoteServiceConsumer::ConnectionId()
       
   446      	TInt ConnectionId();
       
   447      	
       
   448      	void SearchIdentityProviderL(const RMessage2& aMessage);
       
   449      	void IdentityProviders(const RMessage2& aMessage);
       
   450      	void ObserveTransfer(const RMessage2& aMessage);
       
   451      	void ObserveAuthCallback(const RMessage2& aMessage);
       
   452      	TInt CompleteReauthLoop(CSenChunk& aSenChunk);
       
   453         TBool IsTrustedClient(const RMessage2& aMessage);
       
   454     	TBool CleanPassword(const RMessage2& aMessage);
       
   455     	virtual TSecureId SecureId();
       
   456         virtual TVendorId VendorId();
       
   457 
       
   458      	void ObserveCoBranding(const RMessage2& aMessage);
       
   459 
       
   460         void DeliverProgressToClient( TInt aTxnId, TBool aIsIncoming, TBool aIsSoap, const TDesC8& aSoapOrCid, TInt aProgress );
       
   461 
       
   462 
       
   463 #ifdef __ENABLE_ALR__
       
   464     	void MigrateToPrefferedCarrier(TBool aUserChoice) ;
       
   465     	void NewCarrierAcceptedL(TBool aUserChoice) ;
       
   466 #endif //__ENABLE_ALR__
       
   467 
       
   468     private: // Data
       
   469         MSenServiceManager &iManager;
       
   470         MSenRemoteServiceSession* iServiceSession;  // not owned
       
   471         //CSenServiceSession *iServiceSession;      // not owned
       
   472         TInt iStatus;
       
   473     
       
   474         // can be used for routing of messages :
       
   475         // could use the latest UUID for this too..
       
   476         HBufC8* iConsumerID;    
       
   477         HBufC8* iPolicyBuf;     
       
   478     
       
   479         // data to be written to client
       
   480         CBufFlat* iSendBuf; 
       
   481 
       
   482         CSenWSDescription* iInitializer;
       
   483         TInt iAllowWSDataReg;
       
   484         TInt iAllowWSDataUnReg;
       
   485 
       
   486         CSenTransportBase* ipTransport;
       
   487         CSenIdentifier* ipIdentifier;
       
   488         CSenClientMessage* ipHostletAwaitOp;
       
   489 
       
   490         RTransactionArray   iPendingTransactions;   // owned pointers to heap
       
   491         RTransactionIdArray iPendingTxnIds;       // owned pointers to heap
       
   492         RHostletRequestMap  iHostletRequests;      // keys and values are owned
       
   493 
       
   494         //RTransactionArray*      ipPendingTransactions;   // owned pointers to heap
       
   495         //RTransactionIdArray*    ipPendingTxnIds;       // owned pointers to heap
       
   496         //RHostletRequestMap*     ipHostletRequests;      // keys and values are owned
       
   497 
       
   498         TSessionType iSessionType;
       
   499 
       
   500         TInt iAllowShowDialogCount;
       
   501         
       
   502         TInt iConnectionID;
       
   503         
       
   504         TInt iAuthenticationRetries;
       
   505         TBool iConnectionHasAuthenticationCallback;
       
   506         
       
   507         CSenServerContext& iServerContext;
       
   508         TSecureId iSecureId; 
       
   509         TVendorId iVendorId;
       
   510         //session to client side server
       
   511         RSenConnectionServerSession iConnectionSession;
       
   512         TSenDataTrafficDetails iDetails;
       
   513 		
       
   514 		TBool iFwNotified;
       
   515 		
       
   516 		// Cache the client secure id to update clients about connection status
       
   517         TSecureId iClientSecureID;
       
   518         TBool iConnectionHasCoBrandingCallback;
       
   519         TBool iReauthResendNeeded;
       
   520 #ifdef __ENABLE_ALR__        
       
   521        	CALRObserver* iALRObserver;	// mobilty observer		
       
   522 		MMobilityProtocolResp* iMobiltyObserver ;
       
   523 		TBool				iMobilityCallBackForwarded ;
       
   524 		TBool				iMobilityChoice ;
       
   525 #endif //__ENABLE_ALR__
       
   526         };
       
   527 
       
   528 // CLASS DECLARATION
       
   529 NONSHARABLE_CLASS(CSenClientMessage): public CSenChunk
       
   530     {
       
   531     public: 
       
   532         // Constructors and destructor
       
   533         static CSenClientMessage* NewL(const RMessage2& aMessage, MSenRemoteServiceConsumer* apConsumer = NULL);
       
   534         static CSenClientMessage* NewLC(const RMessage2& aMessage, MSenRemoteServiceConsumer* apConsumer = NULL);
       
   535         
       
   536         static CSenClientMessage* NewL(const RMessage2& aMessage, MSenRemoteServiceConsumer* apConsumer, MSenTransport& aTransport);
       
   537         static CSenClientMessage* NewLC(const RMessage2& aMessage, MSenRemoteServiceConsumer* apConsumer, MSenTransport& aTransport);
       
   538         
       
   539         ~CSenClientMessage();
       
   540 
       
   541         // New methods:
       
   542         RMessage2& RMessage();
       
   543         MSenRemoteServiceConsumer* Consumer();
       
   544         
       
   545         TBool operator==(const CSenClientMessage& a);
       
   546         
       
   547         MSenMessageContext& MessageContext();
       
   548         
       
   549         RPointerArray<CSenBinaryData>& BinaryDataArray();
       
   550         
       
   551         TInt CtxId();
       
   552 
       
   553     private:
       
   554         void ConstructL(const RMessage2& aMessage, 
       
   555                         MSenRemoteServiceConsumer* apConsumer = NULL);
       
   556         
       
   557         void ConstructL(const RMessage2& aMessage, 
       
   558                         MSenRemoteServiceConsumer* apConsumer,
       
   559                         MSenTransport& aTransport);
       
   560         CSenClientMessage();
       
   561 
       
   562         
       
   563     private: // Data
       
   564         CSenMessageContext*             ipMessageContext;
       
   565         RMessage2                       iMessage;
       
   566         MSenRemoteServiceConsumer*      ipConsumer; // not owned
       
   567         RPointerArray<CSenBinaryData>   iBinaryDataArray;
       
   568     };
       
   569 
       
   570 
       
   571 NONSHARABLE_CLASS(TFileOutgoingTransferProgress): public TFileOutgoingTransferProgressBase
       
   572     {
       
   573     public: 
       
   574         //~TFileOutgoingTransferProgress();    
       
   575         TFileOutgoingTransferProgress( TInt aTxnId, TBool aIsIncoming, TInt aProgress, TBool aHasCidPostfix, TInt aCid, TInt aCid2 = -1 );
       
   576     };
       
   577 
       
   578 
       
   579 NONSHARABLE_CLASS( TFourInts )
       
   580     {
       
   581     public:
       
   582     	TInt iInt1;
       
   583     	TInt iInt2;
       
   584     	TInt iInt3;
       
   585     	TInt iInt4;
       
   586 	};
       
   587 
       
   588 #endif // SEN_CLIENTSESSION_H
       
   589 
       
   590 // End of File