sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #if (!defined __T_IMPLEMENTATION_INFORMATION_API_DATA_H__) sl@0: #define __T_IMPLEMENTATION_INFORMATION_API_DATA_H__ sl@0: sl@0: // User Includes sl@0: #include "DataWrapperBase.h" sl@0: sl@0: // Classes to get to protected members sl@0: sl@0: // EPOC includes sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CT_ImplementationInformationData: public CDataWrapperBase sl@0: { sl@0: public: sl@0: /** sl@0: * Two phase constructor sl@0: */ sl@0: static CT_ImplementationInformationData* NewL(); sl@0: sl@0: /** sl@0: * Destructor sl@0: */ sl@0: ~CT_ImplementationInformationData(); sl@0: sl@0: /** sl@0: * Process a command read from the ini file sl@0: * sl@0: * @param aCommand The command to process sl@0: * @param aSection The section in the ini containing data for the command sl@0: * @param aAsyncErrorIndex Command index for async calls to return errors to sl@0: * sl@0: * @return ETrue if the command is processed sl@0: * sl@0: * @leave System wide error sl@0: */ sl@0: virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); sl@0: sl@0: /** sl@0: * @return Pointer to the object that the data wraps sl@0: */ sl@0: inline virtual TAny* GetObject() sl@0: { sl@0: return iImplementationInformation; sl@0: }; sl@0: sl@0: /** sl@0: * Set the object that the data wraps sl@0: * sl@0: * @param aObject object that the wrapper is testing sl@0: * sl@0: * @leave KErrNotSupported if the the function is not supported sl@0: */ sl@0: virtual inline void SetObjectL(TAny* aObject) sl@0: { sl@0: iImplementationInformation=static_cast(aObject); sl@0: }; sl@0: sl@0: protected: sl@0: /** sl@0: * Public constructor. First phase construction sl@0: */ sl@0: CT_ImplementationInformationData(); sl@0: sl@0: /** sl@0: * Second phase construction sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: inline void DoCmdDestroy(); sl@0: inline void DoCmdDisplayName(const TDesC& aSection); sl@0: inline void DoCmdDataType(const TDesC& aSection); sl@0: inline void DoCmdOpaqueData(const TDesC& aSection); sl@0: inline void DoCmdImplementationUid(const TDesC& aSection); sl@0: inline void DoCmdVersion(const TDesC& aSection); sl@0: inline void DoCmdDisabled(const TDesC& aSection); sl@0: inline void DoCmdSetDisabled(const TDesC& aSection); sl@0: inline void DoCmdDrive(const TDesC& aSection); sl@0: inline void DoCmdRomOnly(const TDesC& aSection); sl@0: inline void DoCmdRomBased(const TDesC& aSection); sl@0: sl@0: TBool GetUid(const TDesC& aSection, TUid& aUid); sl@0: TBool GetExpectedString(const TDesC& aSection, TPtrC& aDataType); sl@0: TBool GetExpectedResult(const TDesC& aSection, TInt& aExpectedResult); sl@0: TBool GetExpectedHexResult(const TDesC& aSection, TInt& aExpectedResult); sl@0: TBool GetDisabled(const TDesC& aSection, TBool& aDisabled); sl@0: TBool GetExpectedBool(const TDesC& aSection, TBool& aBool); sl@0: TBool GetArrayElement(const TDesC& aSection, TInt& aArrayElement); sl@0: sl@0: // Helper methods sl@0: void DestroyData(); sl@0: sl@0: private: sl@0: CImplementationInformation* iImplementationInformation; sl@0: }; sl@0: sl@0: #endif /* __T_IMPLEMENTATION_INFORMATION_API_DATA_H__ */