os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/inc/T_RDirData.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 /**
    20 @test
    21 @internalComponent
    22 
    23 This contains CT_RDirData
    24 */
    25 
    26 #if (!defined __T_RDIR_DATA_H__)
    27 #define __T_RDIR_DATA_H__
    28 
    29 //	User Includes
    30 #include "DataWrapperBase.h"
    31 
    32 //	EPOC includes
    33 #include <f32file.h>
    34 
    35 class CT_RDirData: public CDataWrapperBase
    36 	{
    37 public:
    38 	static CT_RDirData*	NewL();
    39 	~CT_RDirData();
    40 
    41 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
    42 	virtual TAny*	GetObject();
    43 	
    44 protected:
    45 	CT_RDirData();
    46 	void ConstructL();
    47 	
    48 	void RunL(CActive* aActive, TInt aIndex);
    49 	void DoCancel(CActive* aActive, TInt aIndex);
    50 	
    51 private:
    52 	inline void	DoCmdNew();
    53 	inline void	DoCmdClose();
    54 	inline void	DoCmdOpenL(const TDesC& aSection);
    55 	inline void	DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex);
    56 	inline void DoCmdDestructor();
    57 	void ReadExpectedNamesL( const TDesC& aSection );
    58 	
    59 //Helper function
    60 	void 	DoCleanup();
    61 	void 	CompareEntryArray(TEntryArray* aEntryArray);
    62 	void	CompareEntryData(TEntry* aEntry);
    63 
    64 private:
    65 	//** Instance for handling to resource directory */
    66 	RDir*						iRDir;
    67 	
    68 	/** The request status for read event */
    69 	CActiveCallback*			iRead;	
    70 	
    71 	/** The request status for read array event */
    72 	CActiveCallback*			iReadBlock;
    73 	
    74 	/** entry for async format */
    75 	TPckg<TEntry>*				iEntry;
    76 	
    77 	/** Array of expected file names*/
    78 	RPointerArray<TPath>*		iExpectedNames;
    79 	
    80 		
    81 	TBuf<KMaxPath>				iObjName;
    82 	
    83 	TBool						iCompare;
    84 	
    85 	};
    86 	
    87 #endif /* __T_RDIR_DATA_H__ */