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: @test sl@0: @internalComponent sl@0: sl@0: This contains CT_RDirData sl@0: */ sl@0: sl@0: #if (!defined __T_RDIR_DATA_H__) sl@0: #define __T_RDIR_DATA_H__ sl@0: sl@0: // User Includes sl@0: #include "DataWrapperBase.h" sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: class CT_RDirData: public CDataWrapperBase sl@0: { sl@0: public: sl@0: static CT_RDirData* NewL(); sl@0: ~CT_RDirData(); sl@0: sl@0: virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); sl@0: virtual TAny* GetObject(); sl@0: sl@0: protected: sl@0: CT_RDirData(); sl@0: void ConstructL(); sl@0: sl@0: void RunL(CActive* aActive, TInt aIndex); sl@0: void DoCancel(CActive* aActive, TInt aIndex); sl@0: sl@0: private: sl@0: inline void DoCmdNew(); sl@0: inline void DoCmdClose(); sl@0: inline void DoCmdOpenL(const TDesC& aSection); sl@0: inline void DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex); sl@0: inline void DoCmdDestructor(); sl@0: void ReadExpectedNamesL( const TDesC& aSection ); sl@0: sl@0: //Helper function sl@0: void DoCleanup(); sl@0: void CompareEntryArray(TEntryArray* aEntryArray); sl@0: void CompareEntryData(TEntry* aEntry); sl@0: sl@0: private: sl@0: //** Instance for handling to resource directory */ sl@0: RDir* iRDir; sl@0: sl@0: /** The request status for read event */ sl@0: CActiveCallback* iRead; sl@0: sl@0: /** The request status for read array event */ sl@0: CActiveCallback* iReadBlock; sl@0: sl@0: /** entry for async format */ sl@0: TPckg* iEntry; sl@0: sl@0: /** Array of expected file names*/ sl@0: RPointerArray* iExpectedNames; sl@0: sl@0: sl@0: TBuf iObjName; sl@0: sl@0: TBool iCompare; sl@0: sl@0: }; sl@0: sl@0: #endif /* __T_RDIR_DATA_H__ */