graphicsapitest/graphicssvs/wserv/inc/T_DataDirectScreenAccess.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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_DATADIRECTSCREENACCESS_H_
       
    20 #define T_DATADIRECTSCREENACCESS_H_
       
    21 
       
    22 #include <w32std.h>
       
    23 #include "DataWrapperActive.h"
       
    24 
       
    25 
       
    26 class CT_DataDirectScreenAccess : public CDataWrapperActive 
       
    27 	, public MDirectScreenAccess
       
    28 {
       
    29 public:
       
    30 	static CT_DataDirectScreenAccess* NewL();
       
    31 	~CT_DataDirectScreenAccess();
       
    32 	virtual TAny* GetObject() {return iDirectScreenAccess; }
       
    33 	virtual void SetObjectL(TAny* aAny);
       
    34 	virtual void DisownObjectL();
       
    35 	virtual TBool DoCommandL(const TTEFFunction& aCommand, const
       
    36 			TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    37 	//implement the CDataWrapperActive
       
    38 	virtual	CActive*	GetActive() {return iDirectScreenAccess; }
       
    39 
       
    40 protected:
       
    41 	CT_DataDirectScreenAccess();
       
    42 	void ConstructL();
       
    43 
       
    44 private: //functions to be tested
       
    45 	void DoCmdnewL(const TDesC& aSection);
       
    46 	void DoCmdStartL(const TDesC& aSection);
       
    47 	void DoCmdGcL(const TDesC& aSection);
       
    48 	void DoCmdScreenDeviceL(const TDesC& aSection);
       
    49 	void DoCmdDrawRegion(const TDesC& aSection);
       
    50 	void DoCmdSetPriority(const TDesC& aSection);
       
    51 	void DoCmdBringAppFgL(const TDesC& aSection);
       
    52 	void DoCmdDestructor();
       
    53 	
       
    54 private:	
       
    55 	//implement the MDirectScreenAccess
       
    56 	void Restart(RDirectScreenAccess::TTerminationReasons aReason);
       
    57 	void AbortNow(RDirectScreenAccess::TTerminationReasons aReason);
       
    58 	
       
    59 	//Helper function
       
    60 	void DestroyData();
       
    61 	RWsSession* GetRWSessionL(const TDesC& aSection);
       
    62 	CWsScreenDevice* GetDevicesL(const TDesC& aSection);
       
    63 	RWindow* GetWindowL(const TDesC& aSection);
       
    64 	
       
    65 private:
       
    66 	//Wrapped Object
       
    67 	CDirectScreenAccess* iDirectScreenAccess;
       
    68 	RDirectScreenAccess::TTerminationReasons iWantedReason;
       
    69 	
       
    70 
       
    71 	
       
    72 };
       
    73 
       
    74 
       
    75 
       
    76 #endif /*T_DATADIRECTSCREENACCESS_H_*/