diff -r 000000000000 -r bde4ae8d615e os/ossrv/syslibsapitest/syslibssvs/ecom/inc/T_EComSessionData.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/ossrv/syslibsapitest/syslibssvs/ecom/inc/T_EComSessionData.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,92 @@ +/* +* 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#if (!defined __T_ECOM_SESSION_API_DATA_H__) +#define __T_ECOM_SESSION_API_DATA_H__ + +// User Includes +#include "DataWrapperBase.h" + +// Classes to get to protected members + +// EPOC includes +#include +#include +#include + +class CT_EComSessionData: public CDataWrapperBase + { +private: + struct TTestInterfaceInitParams + { + TInt iInteger; + const TDesC* iDescriptor; + }; + +public: + static CT_EComSessionData* NewL(); + + ~CT_EComSessionData(); + + virtual TAny* GetObject(); + virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); + + // MTPActiveCallback implementation + virtual void RunL(CActive* aActive, const TInt aIndex); + +protected: + CT_EComSessionData(); + void ConstructL(); + +private: + inline void DoCmdOpenL(); + inline void DoCmdClose(); + inline void DoCmdFinalClose(); + inline void DoCmdNotifyOnChange(const TInt aIndex); + inline void DoCmdCancelNotifyOnChange(); + inline void DoCmdListImplementationsL(const TDesC& aSection); + inline void DoCmdCreateImplementationL(const TDesC& aSection); + inline void DoCmdDestroyedImplementation(const TDesC& aSection); + + inline void RunNotifyOnChangeL(const TInt aIndex); + + // Helper methods + void DestroyData(); + + void GetUid(const TDesC& aSection, TUid& aUid); + TBool GetResolver(const TDesC& aSection, TPtrC& aResolver); + TBool GetResolverUid(const TDesC& aSection, TUid& aUid); + TBool GetExpectedResult(const TDesC& aSection, TInt& aExpectedResult); + TBool GetOffset(const TDesC& aSection, TInt& aOffset); + TBool GetDescriptor(const TDesC& aSection, TPtrC& aDescriptor); + TBool GetInteger(const TDesC& aSection, TInt& aInt); + TBool GetEmpty(const TDesC& aSection, TBool& aEmpty); + +private: + REComSession iSession; + TUid iDTorKey; + CActiveCallback* iActiveNotifyOnChange; + TTestInterfaceInitParams iInitParams; + TBuf iInterfaceDesc; + RImplInfoPtrArray iInfoArray; + + //Initially iImplementationInterface==NULL. Object can be created by DoCmdCreateImplementationL. + TAny* iImplementationInterface; + }; +#endif /* __T_ECOM_SESSION_API_DATA_H__ */