graphicsapitest/graphicssvs/wserv/inc/T_DataDsaSession.h
changeset 103 2717213c588a
parent 98 bf7481649c98
child 116 171fae344dd4
child 121 d72fc2aace31
child 187 9f66f99ee56f
equal deleted inserted replaced
98:bf7481649c98 103:2717213c588a
     1 /*
       
     2 * Copyright (c) 2005-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef T_DATADSASESSION_H_
       
    20 #define T_DATADSASESSION_H_
       
    21 
       
    22 #include <w32std.h>
       
    23 #include "DataWrapperBase.h"
       
    24 #include "T_DataWsClientClass.h"
       
    25 
       
    26 class CT_DataDsaSession : public CDataWrapperBase, public CT_DataWsClientClass
       
    27 {
       
    28 public:
       
    29 	static CT_DataDsaSession* NewL();
       
    30 	~CT_DataDsaSession();
       
    31 	virtual TAny* GetObject() {return iDsaSession;}
       
    32 	virtual void SetObjectL(TAny* aAny);
       
    33 	virtual void DisownObjectL();
       
    34 	virtual TBool DoCommandL(const TTEFFunction& aCommand, const
       
    35 			TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    36 
       
    37 protected:
       
    38 	CT_DataDsaSession();
       
    39 	void ConstructL();
       
    40 	void RunL(CActive* aActive, TInt aIndex);
       
    41 	void DoCancel(CActive* aActive, TInt aIndex);
       
    42 	virtual MWsClientClass* GetClientClass() const;
       
    43 	
       
    44 private://functions used to test.
       
    45 	void DoCmdnewL(const TDesC& aSection);
       
    46 	void DoCmdConstruct();
       
    47 	void DoCmdClose();
       
    48 	void DoCmdRequestL(const TDesC& aSection, const TInt aAsyncErrorIndex);
       
    49 	void DoCmdCompleted();
       
    50 	void DoCmdCancel();
       
    51 	
       
    52 	void DoCmdEatupMemory(const TDesC& aSection);
       
    53 	void DoCmdFreeEatenMemory();
       
    54 private:
       
    55 	//helper functions
       
    56 	void DestroyData();
       
    57 	//Helper class
       
    58 	RWsSession* GetRWSessionL(const TDesC& aSection);
       
    59 	
       
    60 	//used in ActiveCallback
       
    61 	void RunRequestReady( const TInt aIndex);
       
    62 
       
    63 private:
       
    64 	RDirectScreenAccess* iDsaSession;
       
    65 	//ActiveCallback objects
       
    66 	CActiveCallback* iActiveRequestReady;
       
    67 };
       
    68 
       
    69 
       
    70 #endif /*T_DATADSASESSION_H_*/