diff -r e8c1ea2c6496 -r 8758140453c0 graphics/wserv/inc/T_DataDirectScreenAccess.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics/wserv/inc/T_DataDirectScreenAccess.h Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,76 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef T_DATADIRECTSCREENACCESS_H_ +#define T_DATADIRECTSCREENACCESS_H_ + +#include +#include "DataWrapperActive.h" + + +class CT_DataDirectScreenAccess : public CDataWrapperActive + , public MDirectScreenAccess +{ +public: + static CT_DataDirectScreenAccess* NewL(); + ~CT_DataDirectScreenAccess(); + virtual TAny* GetObject() {return iDirectScreenAccess; } + virtual void SetObjectL(TAny* aAny); + virtual void DisownObjectL(); + virtual TBool DoCommandL(const TTEFFunction& aCommand, const + TTEFSectionName& aSection, const TInt aAsyncErrorIndex); + //implement the CDataWrapperActive + virtual CActive* GetActive() {return iDirectScreenAccess; } + +protected: + CT_DataDirectScreenAccess(); + void ConstructL(); + +private: //functions to be tested + void DoCmdnewL(const TDesC& aSection); + void DoCmdStartL(const TDesC& aSection); + void DoCmdGcL(const TDesC& aSection); + void DoCmdScreenDeviceL(const TDesC& aSection); + void DoCmdDrawRegion(const TDesC& aSection); + void DoCmdSetPriority(const TDesC& aSection); + void DoCmdBringAppFgL(const TDesC& aSection); + void DoCmdDestructor(); + +private: + //implement the MDirectScreenAccess + void Restart(RDirectScreenAccess::TTerminationReasons aReason); + void AbortNow(RDirectScreenAccess::TTerminationReasons aReason); + + //Helper function + void DestroyData(); + RWsSession* GetRWSessionL(const TDesC& aSection); + CWsScreenDevice* GetDevicesL(const TDesC& aSection); + RWindow* GetWindowL(const TDesC& aSection); + +private: + //Wrapped Object + CDirectScreenAccess* iDirectScreenAccess; + RDirectScreenAccess::TTerminationReasons iWantedReason; + + + +}; + + + +#endif /*T_DATADIRECTSCREENACCESS_H_*/